home *** CD-ROM | disk | FTP | other *** search
- class CPhitMenu extends CMovieClipFresh
- {
- var _buttonBegin;
- var _buttonPickLevel;
- var _buttonResume;
- var _buttonArmor;
- function CPhitMenu()
- {
- super();
- _root._mainMenu = this;
- this.gotoAndPlay("appear");
- }
- function FirstFrameInitialize()
- {
- this._buttonBegin.Initialize("Begin!",this.OnBegin);
- this._buttonPickLevel.Initialize("More Games...",this.OnMoreGames);
- this._buttonResume.Initialize("Skip to level...",this.OnPick);
- var _loc3_ = CPhitPresentation(_root._presentation).GetLastPlayedLevel();
- if(_loc3_ != undefined)
- {
- this._buttonArmor.Initialize("Resume level " + (_loc3_ + 1),this.OnResume);
- }
- else
- {
- this._buttonArmor.SetEnabled(false);
- }
- }
- function FixupButtons()
- {
- this.FirstFrameInitialize();
- }
- function OnAppearDone()
- {
- this.stop();
- }
- function OnMoreGames()
- {
- FreshDebug.Trace("CPhitMenu.OnMoreGames");
- _root.getURL("http://www.armorgames.com/","_blank");
- }
- function OnBegin()
- {
- FreshDebug.Trace("CPhitMenu.OnBegin");
- _root._iStartLevel = 0;
- _root._mainMenu.gotoAndPlay("dismiss");
- }
- function OnDismissDone()
- {
- _root._presentation.gotoAndStop("play");
- }
- function OnPick()
- {
- FreshDebug.Trace("CPhitMenu.OnPick");
- _root._mainMenu.gotoAndPlay("to pick level");
- }
- function OnToPickTransitionDone()
- {
- this.stop();
- }
- function OnResume()
- {
- FreshDebug.Trace("CPhitMenu.OnResume");
- _root._iStartLevel = CPhitPresentation(_root._presentation).GetLastPlayedLevel();
- _root._mainMenu.gotoAndPlay("dismiss");
- }
- }
-